package generic01;

import java.util.ArrayList;
import java.util.Collection;

/**
 * 创建集合对象使用泛型
 */
public class GenericDemo03 {
    public static void main(String[] args) {
        Collection<String> c=new ArrayList<String>();
        c.add("abc");
        c.add("def");
        System.out.println(c);

        Collection c2 = new ArrayList();
        c2.add(13);
        System.out.println(c2);
    }
}
